package com.webex.ta.hydra.gui.macro;

/**
 * Created by Cisco WebEx.
 * User: vegaz
 * Date: 2010-9-14
 * Time: 15:14:19
 */
public class MacroEditorContext {
    private static MacroEditorContext instance;

    private String macroDefFile = null;

    private MacroEditor macroEditor;
    
    private MacroEditorContext() {}

    public static MacroEditorContext getInstance() {
        if (instance == null)
            instance = new MacroEditorContext();
        return instance;
    }

    public void setEditor(MacroEditor editor) {
        macroEditor = editor;
    }

    public MacroEditor getEditor() {
        return macroEditor;
    }

    public void setMacroDefFile(String file) {
        macroDefFile = file;
        macroEditor.setExtendedFrameTitle(file);
        macroEditor.macroFileLoaded(file);
    }

    public String getMacroDefFile() {
        return macroDefFile;
    }
}
